# #列表
# import keyword
# print(keyword.kwlist)


list=[666,'小马',False,2.5]
# print(list[1])
# print(list[-5])
# print(list)
# print(list[0:])
# print(list[0:-1])
# list[1]='小王'
# print(list)
# anotherlist=['无敌了孩子',888,4.38]
# sumlist=list+anotherlist
# print(sumlist)
# list[3:]=[99.9,'有的兄弟有的']
# print(list)
# print(sumlist[0::2])
# print(sumlist[:-1:2])
# print(sumlist[::])
# print(list[-1::-1])
# list.append(360)
# print(list)
# list.insert(2,52)
# print(list)
# list.append('小马')
# print(list)
# list.remove('小马')#移出列表中某个值的第一个匹配项。
# print(list)
# print(list.pop(-1))#移出列表中最后一个元素，并返回该元素值。
# print(list)
# list.reverse()
# print(list)
# list.extend([1,2,3,4])
# print(list)
# list.sort()#从小到大排列
# print(list)
# list.sort(key=0,reverse=True)#翻转列表，从大到小排列
# print(list)
# # print(list[5])    #下标不存在会报错
''''------------------------------------元组--------------------------------------------------'''''
# tup=(1,22,333,4444,300,200,10)
# print(sorted(tup))
# print(tup[::2])
'''--------------------------------字典-----------------------------------'''
# dict={'ename':'max','eno':88,'deptno':2,'job':'master'}
# print(dict,type(dict))
# dict={'ename':'max','eno':88,'deptno':2,'job':'master','job':'dogsbody'}#字典中键唯一，若出现重复键，后面键中的值会覆盖前面的值、
# print(dict,type(dict))
# day=['无',31,28,31,30,31,30,31,31,30,31,30,31]
# year=int(input('请输入年份：'))
# if year%4==0 and year%100!=0 or year%400==0:
#     day[2]=29
# month=int(input('请输入月份：'))
# print(f'{year}年{month}月有{day[month]}天')

字典法一
dict={1:31,2:28,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}
year=int(input('请输入年份：'))
month=int(input('请输入月份：'))
if year%4==0 and year%100!=0 or year%400==0:
    dict[2]=29
print(f'{year}年{month}月有{dict[month]}天')

#字典法二
# dict_run={1:31,2:29,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}
# dict_ping={1:31,2:28,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}
# year=int(input('请输入年份：'))
# month=int(input('请输入月份：'))
# if year%4==0 and year%100!=0 or year%400==0:
#     print(f'{year}年{month}月有{dict_run[month]}天')
# else:
#     print(f'{year}年{month}月有{dict_ping[month]}天')
# #
# print(dict_ping.keys())
# print(dict_ping.values())
# print(dict_ping.items())
# dict_test={}
# dict_test['dname']='科技部'
# dict_test[2]='mx'
# print(dict_test)
# del dict_test['dname']
# print(dict_test)
# dict_test.clear()
# print(dict_test)

# s={1,256,3,4,5}
# print(s)

